// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file LogEntry.hpp
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool fastddsgen.
 */

#ifndef FAST_DDS_GENERATED__LOGENTRY_HPP
#define FAST_DDS_GENERATED__LOGENTRY_HPP

#include <cstdint>
#include <string>
#include <utility>
#include <fastcdr/cdr/fixed_size_string.hpp>

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define eProsima_user_DllExport
#endif  // _WIN32

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(LOGENTRY_SOURCE)
#define LOGENTRY_DllAPI __declspec( dllexport )
#else
#define LOGENTRY_DllAPI __declspec( dllimport )
#endif // LOGENTRY_SOURCE
#else
#define LOGENTRY_DllAPI
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define LOGENTRY_DllAPI
#endif // _WIN32

const int32_t UNDEFINED = 0x10000000;
const int32_t SAMPLE_LOST = 0x10000001;
const int32_t TOPIC_MISMATCH_TYPE = 0x10000002;
const int32_t TOPIC_MISMATCH_QOS = 0x10000003;
/*!
 * @brief This class represents the enumeration Kind defined by the user in the IDL file.
 * @ingroup LogEntry
 */
enum class Kind : int32_t
{
    Info,
    Warning,
    Error
};
/*!
 * @brief This class represents the structure LogEntry defined by the user in the IDL file.
 * @ingroup LogEntry
 */
class LogEntry
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport LogEntry()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~LogEntry()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object LogEntry that will be copied.
     */
    eProsima_user_DllExport LogEntry(
            const LogEntry& x)
    {
                    m_event = x.m_event;

                    m_kind = x.m_kind;

                    m_category = x.m_category;

                    m_message = x.m_message;

                    m_timestamp = x.m_timestamp;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object LogEntry that will be copied.
     */
    eProsima_user_DllExport LogEntry(
            LogEntry&& x) noexcept
    {
        m_event = x.m_event;
        m_kind = x.m_kind;
        m_category = std::move(x.m_category);
        m_message = std::move(x.m_message);
        m_timestamp = std::move(x.m_timestamp);
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object LogEntry that will be copied.
     */
    eProsima_user_DllExport LogEntry& operator =(
            const LogEntry& x)
    {

                    m_event = x.m_event;

                    m_kind = x.m_kind;

                    m_category = x.m_category;

                    m_message = x.m_message;

                    m_timestamp = x.m_timestamp;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object LogEntry that will be copied.
     */
    eProsima_user_DllExport LogEntry& operator =(
            LogEntry&& x) noexcept
    {

        m_event = x.m_event;
        m_kind = x.m_kind;
        m_category = std::move(x.m_category);
        m_message = std::move(x.m_message);
        m_timestamp = std::move(x.m_timestamp);
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x LogEntry object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const LogEntry& x) const
    {
        return (m_event == x.m_event &&
           m_kind == x.m_kind &&
           m_category == x.m_category &&
           m_message == x.m_message &&
           m_timestamp == x.m_timestamp);
    }

    /*!
     * @brief Comparison operator.
     * @param x LogEntry object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const LogEntry& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function sets a value in member event
     * @param _event New value for member event
     */
    eProsima_user_DllExport void event(
            int32_t _event)
    {
        m_event = _event;
    }

    /*!
     * @brief This function returns the value of member event
     * @return Value of member event
     */
    eProsima_user_DllExport int32_t event() const
    {
        return m_event;
    }

    /*!
     * @brief This function returns a reference to member event
     * @return Reference to member event
     */
    eProsima_user_DllExport int32_t& event()
    {
        return m_event;
    }


    /*!
     * @brief This function sets a value in member kind
     * @param _kind New value for member kind
     */
    eProsima_user_DllExport void kind(
            Kind _kind)
    {
        m_kind = _kind;
    }

    /*!
     * @brief This function returns the value of member kind
     * @return Value of member kind
     */
    eProsima_user_DllExport Kind kind() const
    {
        return m_kind;
    }

    /*!
     * @brief This function returns a reference to member kind
     * @return Reference to member kind
     */
    eProsima_user_DllExport Kind& kind()
    {
        return m_kind;
    }


    /*!
     * @brief This function copies the value in member category
     * @param _category New value to be copied in member category
     */
    eProsima_user_DllExport void category(
            const std::string& _category)
    {
        m_category = _category;
    }

    /*!
     * @brief This function moves the value in member category
     * @param _category New value to be moved in member category
     */
    eProsima_user_DllExport void category(
            std::string&& _category)
    {
        m_category = std::move(_category);
    }

    /*!
     * @brief This function returns a constant reference to member category
     * @return Constant reference to member category
     */
    eProsima_user_DllExport const std::string& category() const
    {
        return m_category;
    }

    /*!
     * @brief This function returns a reference to member category
     * @return Reference to member category
     */
    eProsima_user_DllExport std::string& category()
    {
        return m_category;
    }


    /*!
     * @brief This function copies the value in member message
     * @param _message New value to be copied in member message
     */
    eProsima_user_DllExport void message(
            const std::string& _message)
    {
        m_message = _message;
    }

    /*!
     * @brief This function moves the value in member message
     * @param _message New value to be moved in member message
     */
    eProsima_user_DllExport void message(
            std::string&& _message)
    {
        m_message = std::move(_message);
    }

    /*!
     * @brief This function returns a constant reference to member message
     * @return Constant reference to member message
     */
    eProsima_user_DllExport const std::string& message() const
    {
        return m_message;
    }

    /*!
     * @brief This function returns a reference to member message
     * @return Reference to member message
     */
    eProsima_user_DllExport std::string& message()
    {
        return m_message;
    }


    /*!
     * @brief This function copies the value in member timestamp
     * @param _timestamp New value to be copied in member timestamp
     */
    eProsima_user_DllExport void timestamp(
            const std::string& _timestamp)
    {
        m_timestamp = _timestamp;
    }

    /*!
     * @brief This function moves the value in member timestamp
     * @param _timestamp New value to be moved in member timestamp
     */
    eProsima_user_DllExport void timestamp(
            std::string&& _timestamp)
    {
        m_timestamp = std::move(_timestamp);
    }

    /*!
     * @brief This function returns a constant reference to member timestamp
     * @return Constant reference to member timestamp
     */
    eProsima_user_DllExport const std::string& timestamp() const
    {
        return m_timestamp;
    }

    /*!
     * @brief This function returns a reference to member timestamp
     * @return Reference to member timestamp
     */
    eProsima_user_DllExport std::string& timestamp()
    {
        return m_timestamp;
    }



private:

    int32_t m_event{0};
    Kind m_kind{Kind::Info};
    std::string m_category;
    std::string m_message;
    std::string m_timestamp;

};

#endif // _FAST_DDS_GENERATED_LOGENTRY_HPP_


